import request from '@/utils/request'
const api = {
    isEnableList:[
        {isEnable:"禁用"},
        { isEnable:"启用"} //禁用启用下拉框
    ]
}

//vip会员列表
api.query = data => {
	let p = request({
    	url: `/order/vip/query`,
        method: 'get',
        params: data
      })
      p.then(res=>{
          res.data.page.list.forEach(e => {
              if(e.isEnable == 0){
                  e.isEnable = '是' || '禁用'
              }else{
                  e.isEnable = '否'  || '启用'
              }
              if(e.type == 1){
                  e.type = '包年'
              }else{
                  e.type = '包月'
              }
              if(e.isRecommend == 1){
                  e.isRecommend = '是'
              }else{
                  e.isRecommend = '否'
              }
             
          });
          return res;
      })
      return p;
}



export default api